﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MotionDetail.aspx.cs" Inherits="OUSMS.MotionDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="topchannel">
        提案查看
    </div>
    <asp:FormView ID="motionDetailFormView" runat="server"
        ItemType="OUSMS.AppLogic.DataAccessLayer.Motions"
        SelectMethod="motionDetailFormView_GetItem" OnItemCreated="motionDetailFormView_ItemCreated" OnPreRender="motionDetailFormView_PreRender">
        <ItemTemplate>
            <table class="table1" border="0" cellspacing="1" cellpadding="2">
                <tr class="row2">
                    <td><b>提案标题:</b></td>
                    <td colspan="3" align="center" style="font-weight: bold"><%# Item.Title %></td>
                </tr>
                <tr class="row1">
                    <td style="width: 10%"><b>研究类型:</b></td>
                    <td style="width: 40%"><%# Item.StudyAreas.Name %></td>
                    <td style="width: 10%"><b>提案类型:</b></td>
                    <td style="width: 40%"><%# Item.Type %></td>
                </tr>
                <tr class="row2">
                    <td><b>提交时间:</b></td>
                    <td><%# Item.SumbitDateTime.HasValue?Item.SumbitDateTime.Value.ToString("yyyy/MM/dd HH:mm"):"尚未提交"%></td>
                    <td><b>当前状态:</b></td>
                    <td><%# Item.Status%></td>
                </tr>
                <tr class="row1">
                    <td><b>关键词</b></td>
                    <td colspan="3"><%# Item.Keywords %></td>
                </tr>
                <tr class="row2">
                    <td colspan="4"><b>研究背景和选题意义</b></td>
                </tr>
                <tr class="row1">
                    <td colspan="4" style="padding: 10px" align="left"><%# System.Net.WebUtility.HtmlDecode(Item.Abstract) %></td>
                </tr>
                <tr class="row2">
                    <td colspan="4"><b>研究思路</b></td>
                </tr>
                <tr class="row1">
                    <td colspan="4" style="padding: 10px" align="left"><%# System.Net.WebUtility.HtmlDecode(Item.Content)  %></td>
                </tr>
                <tr class="row2">
                    <td colspan="4"><b>预期目标</b></td>
                </tr>
                <tr class="row1">
                    <td colspan="4" style="padding: 10px" align="left"><%# System.Net.WebUtility.HtmlDecode(Item.Target)  %></td>
                </tr>
                <tr class="row2">
                    <td colspan="4"><b>相关部门</b></td>
                </tr>
                <tr class="row1">
                    <td colspan="4" style="padding: 10px" align="left">
                        <%#departments %>
                    </td>
                </tr>
                <tr class="row2">
                    <td colspan="4"><b>附件</b></td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:GridView ID="filesGridView" runat="server" ShowHeaderWhenEmpty="true"
                            AutoGenerateColumns="False" ItemType="OUSMS.AppLogic.DataAccessLayer.MotionFiles"
                            SelectMethod="filesGridView_GetData" GridLines="Vertical" BorderStyle="None"
                            OnRowDataBound="filesGridView_RowDataBound" EmptyDataText="未添加附件"
                            Style="width: 100%; color: #686868; font-size: 14px; font-family: 宋体; background-color: #bed0e2; vertical-align: middle; border-collapse: collapse">
                            <Columns>
                                <asp:TemplateField HeaderText="序号">
                                    <ItemTemplate>
                                        <asp:Label ID="indexLbl" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                                        Wrap="false" Width="10%" />
                                    <ItemStyle HorizontalAlign="Center" Font-Bold="true" VerticalAlign="Middle" Width="10%" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="文件名">
                                    <ItemTemplate>
                                        <asp:Label ID="fileNameLbl" runat="server" Text='<%#Item.FileName.Length > 25? Item.FileName.Substring(0,23)+"...":Item.FileName %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                                        Wrap="false" Width="50%" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50%" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="上传时间">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%#Item.UploadDateTime.ToString("yyyy/MM/dd HH:mm") %>' Width="100%"></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Width="25%"
                                        Wrap="false" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="25%" Wrap="false" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="下载">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="downloadLnkBtn" runat="server" NavigateUrl='<%# "DownloadFile.aspx?MID="+ Item.ID %>' Font-Underline="true"
                                            Target="_blank">下载</asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" Width="25%"
                                        Wrap="false" />
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="25%" Wrap="false" />
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle CssClass="row1" />
                            <PagerStyle CssClass="rowend" HorizontalAlign="Center" />
                            <RowStyle CssClass="row2" />
                            <AlternatingRowStyle CssClass="row1" />
                            <EmptyDataRowStyle CssClass="row2" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr class="row2">
                    <td style="width: 10%"><b>预审时间:</b></td>
                    <td style="width: 40%"><%# Item.PrejudicDateTime.HasValue?Item.PrejudicDateTime.Value.ToString("yyyy/MM/dd HH:mm"):""  %></td>
                    <td style="width: 10%"><b>预审意见:</b></td>
                    <td style="width: 40%"><%# Item.PrejudicComment %></td>
                </tr>
                <tr class="row1">
                    <td colspan="4"><b>专家评审意见</b></td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:Repeater ID="feedbackRepeater" runat="server"
                            ItemType="OUSMS.AppLogic.DataAccessLayer.MotionReviewerComments">
                            <HeaderTemplate>
                                <table border="0" cellspacing="1" cellpadding="0"
                                    style="width: 100%; color: #686868; font-size: 14px; font-family: 宋体; background-color: #bed0e2; vertical-align: middle; border-collapse: separate">
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr class="row2">
                                    <td style="width: 10%"><b>评审人:</b></td>
                                    <td style="width: 23%"><%#Item.Users.Name %></td>
                                    <td style="width: 10%"><b>评审人身份:</b></td>
                                    <td style="width: 23%"><%#Item.RoleType %></td>
                                    <td style="width: 10%"><b>评审时间：</b></td>
                                    <td style="width: 23%"><%#Item.CommentDateTime.HasValue?Item.CommentDateTime.Value.ToString("yyyy/MM/dd HH:mm"):"尚未反馈" %></td>
                                </tr>
                                <tr class="row1">
                                    <td><b>评审意见：</b></td>
                                    <td colspan="5" style="word-wrap: break-word; word-break: break-all; text-align: left">
                                        <%#string.IsNullOrEmpty(Item.Comment)?"尚未反馈":Item.Comment%></td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
                <tr class="row2">
                    <td><b>终审时间:</b></td>
                    <td colspan="3" align="left"><%# Item.EndDateTime.HasValue?Item.EndDateTime.Value.ToString("yyyy/MM/dd HH:mm"):""  %></td>
                </tr>
                <tr class="row1">                    
                    <td><b>终审意见:</b></td>
                    <td colspan="3" align="left"><%# Item.EndComment %></td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:FormView>
</asp:Content>
